home *** CD-ROM | disk | FTP | other *** search
/ Sports Illustrated for Kids - Awesome Athletes! / Sports Illustrated for Kids - Awesome Athletes!.iso / opt.dir / 00001_MovieScript.ls next >
Encoding:
Text File  |  1996-04-18  |  3.6 KB  |  102 lines

  1. global gOPTPos, gOptSaveIntro, gOptSaveRandom, gOptSaveIdle, gOptSaveTRPop, gOptSaveMAFlip, gOptSaveCRAnim, gOptSaveBigVR, gOptSaveVolume, gTHReopen, gSICurrMovie
  2.  
  3. on startMovie
  4.   tell the stage
  5.     pause()
  6.   end tell
  7.   set the exitLock to 1
  8.   set the visible of window "opt" to 1
  9.   set gOPTPos to [198, 186, 174, 162, 150, 137, 125, 114, 102, 90]
  10.   puppetSprite(12, 1)
  11.   set gOptSaveIntro to not (not value(HSStateGet("opt", "Intro")))
  12.   set gOptSaveRandom to not (not value(HSStateGet("opt", "Random")))
  13.   set gOptSaveIdle to not (not value(HSStateGet("opt", "Idle")))
  14.   set gOptSaveTRPop to not (not value(HSStateGet("opt", "TRPop")))
  15.   set gOptSaveMAFlip to not (not value(HSStateGet("opt", "MAFlip")))
  16.   set gOptSaveCRAnim to not (not value(HSStateGet("opt", "CRAnim")))
  17.   set gOptSaveBigVR to not (not value(HSStateGet("opt", "BigVR")))
  18.   set gOptSaveVolume to GetVolume()
  19.   set the hilite of cast "Intro Check" to gOptSaveIntro
  20.   set the hilite of cast "Random Check" to gOptSaveRandom
  21.   set the hilite of cast "Idle Check" to gOptSaveIdle
  22.   set the hilite of cast "Balloon Check" to gOptSaveTRPop
  23.   set the hilite of cast "Flip Check" to gOptSaveMAFlip
  24.   set the hilite of cast "CR Anim Check" to gOptSaveCRAnim
  25.   set the hilite of cast "VR Check" to gOptSaveBigVR
  26.   placeMarker(GetVolume())
  27. end
  28.  
  29. on placeMarker aPos
  30.   if aPos < 1 then
  31.     set aPos to 1
  32.   else
  33.     if aPos > 10 then
  34.       set aPos to 10
  35.     end if
  36.   end if
  37.   set vY to getAt(gOPTPos, aPos)
  38.   set the locV of sprite 12 to vY
  39.   updateStage()
  40. end
  41.  
  42. on yToPos aY
  43.   if aY > getAt(gOPTPos, 1) then
  44.     return 1
  45.   end if
  46.   repeat with vI = 1 to 9
  47.     if (aY <= getAt(gOPTPos, vI)) and (aY > getAt(gOPTPos, vI + 1)) then
  48.       return vI
  49.     end if
  50.   end repeat
  51.   return 10
  52. end
  53.  
  54. on updateValues
  55.   global gSIPPWrite, gSICurrMovie, gMAflip, MAflavor, MAmenuList, gMAmenu, gMALev
  56.   HSStatePut("opt", "Intro", string(the hilite of cast "Intro Check"))
  57.   HSStatePut("opt", "Random", string(the hilite of cast "Random Check"))
  58.   HSStatePut("opt", "Idle", string(the hilite of cast "Idle Check"))
  59.   HSStatePut("opt", "TRPop", string(the hilite of cast "Balloon Check"))
  60.   HSStatePut("opt", "MAFlip", string(the hilite of cast "Flip Check"))
  61.   HSStatePut("opt", "CRAnim", string(the hilite of cast "CR Anim Check"))
  62.   HSStatePut("opt", "BigVR", string(the hilite of cast "VR Check"))
  63.   set vDummy to gSIPPWrite(mCall, "VR", "Resolution", string(not (the hilite of cast "VR Check")), "QTW.INI")
  64.   if gSICurrMovie = "ma" then
  65.     tell the stage
  66.       set gMAflip to value(HSStateGet("opt", "MAFlip"))
  67.       if gMAflip = 1 then
  68.         set MAflavor to getAt(MAmenuList, 2)
  69.         set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
  70.       end if
  71.       if gMAflip = 0 then
  72.         set MAflavor to getAt(MAmenuList, 4)
  73.         set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
  74.       end if
  75.       put "DUCK" && gMAmenu && string(getAt(MAflavor, gMALev))
  76.     end tell
  77.   end if
  78. end
  79.  
  80. on restoreValues
  81.   global gSIPPWrite
  82.   HSStatePut("opt", "Intro", string(gOptSaveIntro))
  83.   HSStatePut("opt", "Random", string(gOptSaveRandom))
  84.   HSStatePut("opt", "Idle", string(gOptSaveIdle))
  85.   HSStatePut("opt", "TRPop", string(gOptSaveTRPop))
  86.   HSStatePut("opt", "MAFlip", string(gOptSaveMAFlip))
  87.   HSStatePut("opt", "CRAnim", string(gOptSaveCRAnim))
  88.   HSStatePut("opt", "BigVR", string(gOptSaveBigVR))
  89.   SetVolume(gOptSaveVolume)
  90.   set vDummy to gSIPPWrite(mCall, "VR", "Resolution", string(not gOptSaveBigVR), "QTW.INI")
  91. end
  92.  
  93. on optQuit
  94.   if gOptSaveBigVR <> the hilite of cast "VR Check" then
  95.     set gTHReopen to 1
  96.   end if
  97.   tell the stage
  98.     continue()
  99.   end tell
  100.   forget(window "opt")
  101. end
  102.